package com.aizhixin.lab.project.course.repository;

import com.aizhixin.lab.project.course.entity.TeacherModuleTaskFile;
import com.aizhixin.lab.project.course.entity.TeacherProject;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface TeacherProjectRepository extends JpaRepository<TeacherProject,String> {
    List<TeacherProject> findByCreatedByAndIsPublishAndDeleteFlagAndParentIdIsNull(Long createBy,Integer isPublish,Integer deleteFlag);
    Page<TeacherProject> findByCreatedByAndIsPublishAndDeleteFlagAndParentIdIsNullAndProjectNameLikeIgnoreCase(Pageable page, Long createBy, Integer isPublish, Integer deleteFlag,String projectName);
    Page<TeacherProject> findByCreatedByAndIsPublishAndDeleteFlagAndParentIdIsNullAndProjectNameLikeIgnoreCaseOrOtherTeacherLikeIgnoreCase(Pageable page, Long createBy, Integer isPublish, Integer deleteFlag,String projectName,String otherTeacher);
    List<TeacherProject> findByParentIdAndDeleteFlag(String parentId,Integer deleteFlag);
    List<TeacherProject> findByParentIdAndProjectTypeAndDeleteFlag(String parentId,String projectType,Integer deleteFlag);

}
